<html>
<head>
    <meta charset="UTF-8">
    <title>权限展示</title>
    <link rel="stylesheet" type="text/css" href="css/news.css">
    <script src="js/jquery-1.8.2.min.js"></script>
    <script>
        $(function(){
            $("#public").load("./public.html");
        });
    </script>
    <meta http-equiv="Access-Control-Allow-Origin" content="http://10.101.147.56/month3/tp5.0/public/admin/control/showControl">
</head>
<body>
<div>
	<div id="public"></div>
	<div class="news_top"> 
        <span style="margin-left: 30px; font-size: 18px" >权 限 展 示</span>
		<a href="control_add.html" class="news_add_title">+权限添加</a>
	</div>
    <div class="control_list_main" id="control_list" align="center">
        <table width="86%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <tr>
                <th width="40" align="center">权 限 id</th>
                <th width="60" align="center">权 限 名 称</th>
                <th width="100" align="center">权限内容</th>
                <th width="60" align="center">操 作</th>
            </tr>
                <tr control_id="1" v-for="val in Control_Content.data">
                    <td align="center">{{val.control_id}}</td>
                    <td align="center">{{val.control_name}}</td>
                    <td align="center">{{val.control_content}}</td>
                    <td align="center"><a href="control_update.html">编辑</a> | <a href="#">删除</a></td>
                </tr>
        </table>
    </div>
</div>
<script src="http://cdn.bootcss.com/vue/2.1.0/vue.js" type="text/javascript" charset="utf-8"></script>
<script src="http://cdn.bootcss.com/vue-resource/1.0.3/vue-resource.js" type="text/javascript" charset="utf-8"></script>
<script>
    new Vue({
        el:'#control_list',
        data: {
            Control_Content:[],
            control_content_url: 'http://10.101.147.56/month3/tp5.0/public/admin/control/showControl '  //存数据接口
        },
        created: function(){
            this.getImg() ;      //定义方法
        },
        methods: {
            getImg: function(){
                this.$http({      //调用接口
                    method:'GET',
                    url:this.control_content_url //this指data
                }).then(function(response){ //接口返回数据
                    //console.log(response.data);
                    this.Control_Content=response.data;
                },function(error){
                    console.log(error);
                })
            }
        }
    });
</script>
</body>
</html>